//
//  LeftSlideCell.swift
//  ShareUmbrella
//
//  Created by duanmingyang on 2017/9/15.
//  Copyright © 2017年 尧尚信息科技. All rights reserved.
//

import UIKit

class LeftSlideCell: UITableViewCell {

    let kScreenHeight = UIScreen.main.bounds.size.height
    let kScreenWidth = UIScreen.main.bounds.size.width
    
    var icon:UIImageView?
    var titleLabel:UILabel?
    var priceLabel:UILabel?
    var shopCar:UIButton?
    
    required init?(coder aDecoder:NSCoder) {
        super.init(coder: aDecoder)
    }
    
    override init(style:UITableViewCellStyle, reuseIdentifier:String?) {
        
        super.init(style: style, reuseIdentifier: reuseIdentifier)
        self.backgroundColor = UIColor.white
        self.setUpUI();
    }
    
    func setUpUI() {
        
        //头像
        icon = UIImageView.init(frame: CGRect(x: 35, y: 11, width: 20, height: 22))
        icon?.image = UIImage.init(named: "")
        self.addSubview(icon!)
        
        //文字信息
        titleLabel = UILabel.init()
        titleLabel?.backgroundColor = UIColor.clear;
        titleLabel?.frame = CGRect(x:100, y:0, width:kScreenWidth, height:44)
        titleLabel?.text = "我的账户"
        titleLabel?.textColor = RGB(r: 114, 115, 116)
        titleLabel?.font = UIFont.systemFont(ofSize: 18)
        //titleLabel?.sizeToFit()
        //titleLabel?.contentMode = UIViewContentMode.top
        addSubview(self.titleLabel!)
        
        
    }
    
    //RGB
    func RGB(r:CGFloat,_ g:CGFloat,_ b:CGFloat) -> UIColor{
        return UIColor(red: (r)/255.0, green: (g)/255.0, blue: (b)/255.0, alpha: 1.0)
    }
    
}
